package cn.niitcxl.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("edu_message")
public class eduMessage {
    @TableId
    private Integer id;
    private String fromPeople;
    private String message;
    //对该字段做自动填充
    @TableField(value = "insert_date",fill = FieldFill.INSERT_UPDATE)
    //对日期做格式化
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd ,HH:mm:ss",timezone = "GMT+8")
    private Date insertDate;
}